Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature reset integration test should tolerate failed resets #72326

Merged

Conversation

williamrandolph
Copy link
Contributor

This didn't cause a problem in the branch builds, but it did on the intake build. Basically, in this test we should just be looking for at least one success, but the contains matcher required the result to just be "SUCCESS". This was wrong. In fact, it was redundant with a check a few lines above, so it's probably best to just remove it and add a comment about what the test is looking for.

@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Apr 27, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

.map(ResetFeaturesResponse.ResetFeatureStateStatus::getStatus)
.collect(Collectors.toSet());

assertThat(statuses, contains("SUCCESS"));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was redundant with the check on line 55/58.

Copy link
Member

@jaymode jaymode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@williamrandolph williamrandolph merged commit 8f0e5dc into elastic:master Apr 27, 2021
williamrandolph added a commit to williamrandolph/elasticsearch that referenced this pull request Apr 27, 2021
…#72326)

* Remove redundant section of test
* Mention in javadoc that we check task index specifically
williamrandolph added a commit that referenced this pull request Apr 27, 2021
* Make feature reset API response more informative (#71240)

Previously, the ResetFeatureStateStatus object captured its status in a
String, which meant that if we wanted to know if something succeeded or
failed, we'd have to parse information out of the string. This isn't a
good way of doing things.

I've introduced a SUCCESS/FAILURE enum for status constants, and added a
check for failures in the transport action. We return a 207 if some but not all
reset actions fail, and for every failure, we also return information about the
exception or error that caused it.

* Fix 7.x backport compilation issues

* Feature reset integration test should tolerate failed resets (#72326)

Co-authored-by: Jay Modi <[email protected]>
williamrandolph added a commit to williamrandolph/elasticsearch that referenced this pull request Apr 27, 2021
…stic#72332)

* Make feature reset API response more informative (elastic#71240)

Previously, the ResetFeatureStateStatus object captured its status in a
String, which meant that if we wanted to know if something succeeded or
failed, we'd have to parse information out of the string. This isn't a
good way of doing things.

I've introduced a SUCCESS/FAILURE enum for status constants, and added a
check for failures in the transport action. We return a 207 if some but not all
reset actions fail, and for every failure, we also return information about the
exception or error that caused it.

* Fix 7.x backport compilation issues

* Feature reset integration test should tolerate failed resets (elastic#72326)

Co-authored-by: Jay Modi <[email protected]>
williamrandolph added a commit that referenced this pull request Apr 28, 2021
* Add docs for feature reset API (#71759)

* Make feature reset API response more informative (#71240)

Previously, the ResetFeatureStateStatus object captured its status in a
String, which meant that if we wanted to know if something succeeded or
failed, we'd have to parse information out of the string. This isn't a
good way of doing things.

I've introduced a SUCCESS/FAILURE enum for status constants, and added a
check for failures in the transport action. We return a 207 if some but not all
reset actions fail, and for every failure, we also return information about the
exception or error that caused it.

* Fix 7.x backport compilation issues

* Feature reset integration test should tolerate failed resets (#72326)

Co-authored-by: debadair <[email protected]>
Co-authored-by: Jay Modi <[email protected]>
@williamrandolph williamrandolph deleted the bugfix/test-reset-features branch May 23, 2022 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Core/Infra/Plugins Plugin API and infrastructure >non-issue Team:Core/Infra Meta label for core/infra team v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants